﻿using System;
using MigraDoc.DocumentObjectModel;

namespace Xenta.Utils
{
    /// <summary>
    /// Represents the PDFsharp and MigraDoc helper.
    /// </summary>
    internal static class PDFHelper
    {
        #region Constants

        public static readonly Color COLOR_BLACK = new Color(0x00, 0x00, 0x00);
        public static readonly Color COLOR_WHITE = new Color(0xff, 0xff, 0xff);

        #endregion

        #region Methods

        public static void AddFmtText(this Paragraph p, string fmt, params object[] args)
        {
            p.AddText(String.Format(fmt, args));
        }

        public static void AddText(this Paragraph p, TextFormat txtFmt, string text)
        {
            p.AddFormattedText(text, txtFmt);
        }

        public static void AddFmtText(this Paragraph p, TextFormat txtFmt, string fmt, params object[] args)
        {
            p.AddFormattedText(String.Format(fmt, args), txtFmt);
        }

        #endregion
    }
}
